calculation of power of signal